import request from '@/utils/request'

// 获取经纪列表
export const getAgents = params => request({
  url: '/agents',
  params
})
// 获取经纪数量
export const getagentsCount = () => request({
  url: '/agents/count'
})
// 新建经纪
export const addAgents = data => request({
  url: '/agents',
  method: 'post',
  data
})
// 删除经纪
export const delAgents = id => request({
  url: '/agents/' + id,
  method: 'delete'
})
// 获取指定经纪
export const getAssignAgents = id => request({
  url: '/agents/' + id
})
// 编辑经纪
export const emitAgents = data => request({
  url: '/agents/' + data.id,
  method: 'put',
  data
})
